import {get} from '../../utils/request'
export default {
    namespaced:true,
    state: {
        user_info:{}
    },
    mutations: {
        SET_USER_INFO(state,playload){
            state.user_info = playload;
        }
    },
    actions: {
        async loadUser({commit}){
            let resp = await get('/user/info',{token:localStorage.getItem('token')});
            commit('SET_USER_INFO',resp.data)
        }
    }
}